import axios from "axios";
export let getlist = ()=>{
    return (dispatch)=>{
        axios.get("/api/list").then(res=>{
            dispatch({
                type:"getlist",
                payload:res.data
            })
        })
    }
}
export let delfn = (index)=>{
    return {
        type:"delfn",
        payload:index
    }
}
export let addfn = (item)=>{
    return {
        type:"addfn",
        payload:item
    }
}
export let editFn = (item)=>{
    return {
        type:"editFn",
        payload:item
    }
}
export let searChfn = (ipt,ipt1)=>{
    return {
        type:"searChfn",
        payload:ipt,
        payload1:ipt1
    }
}